﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using umbraco.presentation.umbraco.dialogs;
using umbraco.uicontrols;

namespace TheOutfield.UmbExt.AutoExport2DotNet
{
    public class ExportCodeProxy : ExportCode
    {
        public ExportCodeProxy()
        {
            base.ddlGenerationMode = new DropDownList();
            base.ddlGenerationMode.Items.Add("abs");
            base.ddlGenerationMode.Items.Add("poco");
            base.txtDataContextName = new TextBox();
            base.txtNamespace = new TextBox();
            base.pnlButtons = new Panel();
            base.pane_files = new Pane();
            base.lnkAbstractions = new HyperLink();
            base.lnkPoco = new HyperLink();
        }

        public void Generate(string mode, string dataContextName, string nspace)
        {
            base.ddlGenerationMode.SelectedValue = mode;
            base.txtDataContextName.Text = dataContextName;
            base.txtNamespace.Text = nspace;

            base.btnGenerate_Click(this, new EventArgs());
        }
    }
}